package com.helloandroid.tools

import org.junit.Test

class ktBaseTest {

    @Test
    fun genLst(){
        var idxLst = generateSequence(0){it + 1}
                .takeWhile { it < 9 }
                .shuffled()
                .filterIndexed { index, i -> index < 4  }
                .toList()
        println("-------------------------")
        idxLst.forEach(::println)
    }

    @Test
    fun random_from_set(){
        val value = setOf<Int>(1,2,3,4).random()
        println("value:$value")
    }

}